// 引入公共样式
@import '../../style/common.less';

// 整体背景颜色
.application-container {
    background-color: @cf5 ;
}

.my-swipe .van-swipe-item {
    text-align: center;

    .chart-list {
        height: 236px;

        .chart-box {
            height: 100%;
            text-align: center;
        }
    }
}


.func-box {
    display: block;
    position: relative;
    margin: 0 12px 12px;
    background-color: @cff ;
    border-radius: 1px;
    box-shadow: 0 0 10px rgba(143, 143, 143, .1);

    >.title {
        display: block;
        font-size: .7rem;
        color: @primary;
        font-weight: 600;
        padding: 5px 10px;

        &::before {
            content: '';
            display: inline-block;
            width: 2px;
            height: 20px;
            margin-right: 10px;
            vertical-align: middle;
            background-color: @primary;
        }
    }

    >.box {
        display: block;
        position: relative;
        border-top: 1px solid #B3B3B3;
        width: 100%;
        .clear();
        padding: 8px;

        .item {
            width: 25%;
            float: left;

            i {
                display: block;
                width: 48px;
                height: 48px;
                margin: auto;
                background-position: center;
                background-repeat: no-repeat;
                background-size: 36px;
                .loop();
            }

            span {
                display: block;
                text-align: center;
                font-size: .6rem;
                color: @primary;
            }
        }
    }
}

// 样式递归，使用图标的名称做参数
@icons: product-list product-new project-list project-new purchase-list purchase-new receive-list receive-new setting supplier-list supplier-new;

// less中数组从1开始
.loop(@index: 1) when(@index<=length(@icons)) {
    @icon: extract(@icons, @index);

    &.@{icon} {
        background-image: url('../../images/home/@{icon}.png');
    }

    .loop(@index+1)
}